package com.ykdl.member.kid.beans;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import net.wxxr.http.interfaces.IJsonParser;

import android.text.TextUtils;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public class GroupBean implements Serializable,IJsonParser{

	/**
	 * "created_actor": {}, 
        "created_time": 1395113449.15293, 
        "description": "怀孕辣妈畅谈经验圈子", 
        "display_order": 15, 
        "group_id": 67, 
        "group_name": "孕妈经验", 
        "group_type": 0, 
        "is_member": false, 
        "latest_topic_ids": [], 
        "notice": null, 
        "state": 1
	 */
	private static final long serialVersionUID = 4092199807949588343L;
	private UserBean created_actor;
	private float created_time;
	private String description;
	private int display_order;
	private int group_id;
	private String group_name;
	private int group_type;
	private boolean is_member;
	private List<Integer> latest_topic_ids = new ArrayList<Integer>();
	private String notice;
	private int state;
	
	public UserBean getCreated_actor() {
		return created_actor;
	}

	public void setCreated_actor(UserBean created_actor) {
		this.created_actor = created_actor;
	}

	public float getCreated_time() {
		return created_time;
	}

	public void setCreated_time(float created_time) {
		this.created_time = created_time;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getDisplay_order() {
		return display_order;
	}

	public void setDisplay_order(int display_order) {
		this.display_order = display_order;
	}

	public int getGroup_id() {
		return group_id;
	}

	public void setGroup_id(int group_id) {
		this.group_id = group_id;
	}

	public String getGroup_name() {
		return group_name;
	}

	public void setGroup_name(String group_name) {
		this.group_name = group_name;
	}

	public int getGroup_type() {
		return group_type;
	}

	public void setGroup_type(int group_type) {
		this.group_type = group_type;
	}

	public boolean isIs_member() {
		return is_member;
	}

	public void setIs_member(boolean is_member) {
		this.is_member = is_member;
	}

	public List<Integer> getLatest_topic_ids() {
		return latest_topic_ids;
	}

	public void setLatest_topic_ids(List<Integer> latest_topic_ids) {
		this.latest_topic_ids = latest_topic_ids;
	}

	public String getNotice() {
		return notice;
	}

	public void setNotice(String notice) {
		this.notice = notice;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	@Override
	public IJsonParser parse(String json) throws Exception {
		// TODO Auto-generated method stub
		if(TextUtils.isEmpty(json)){
			GsonBuilder b = new GsonBuilder();
			Gson gson  = b.create();
			return gson.fromJson(json, GroupBean.class);
		}
		return null;
	}

}
